/**
 * FileName: BigMapTests Author:   baoy Date:     2018/10/12 14:24 Description:
 */
package com.baoy.xxx.guava.map;

import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class BigMapTests {


    public static void main(String[] arg) {
        //其对应的实现HashBiMap，ImmutableBiMap，EnumBiMap，EnumHashBiMap
        BiMap<Integer, String> userId = HashBiMap.create();
        userId.put(1, "tom");
        //在想使用反向映射时使用inverse反转键值对关系
        log.info("{}", userId.inverse().get("tom"));
    }
}
